var EBUndefinedEvents = Class.create( );
EBUndefinedEvents.prototype = {

	initialize: function( ) {
		this.container = $($RGC().ueventsContainer);
		$RGE('uevents-data').addObserver(this);
	},
	
	start: function() {
		$RGE('uevents-data').load();
	},
	
	update: function() {
		if(!$RGE('uevents-data').isLoaded( )) return;	
		$A($RGE('uevents-data').events).each(
			function(el) {
				this.insertEvent(el);
			}.bind(this)
		);
	},
	
	insertEvent: function(e) {
      var event= document.createElement('div');
      event.setAttribute("class","event-container " + e['keywords']);
      event.setAttribute("id","event-"+e['id']);
      event.appendChild(document.createTextNode(e['title']));
      this.container.appendChild(event);
	}

}
